//
//  BankCardConfirmViewController.swift
//  EasyDana
//
//  Created by mac on 2024/10/17.
//

import UIKit
import RxSwift
import RxCocoa
class BankCardConfirmViewController: UIViewController {

    private let bag = DisposeBag()
    
    let bankCardNo = BehaviorRelay(value: "")
    
    let confirm = PublishSubject<Bool>()
    
    override func viewDidLoad() {
        super.viewDidLoad()
        self.bankCardNo.bind(to: self.numberField.rx.text).disposed(by: self.bag)
        self.numberField.rx.text.orEmpty.bind(to: self.bankCardNo).disposed(by: self.bag)
        // Do any additional setup after loading the view.
    }
    @IBOutlet weak var numberField: UITextField!
    
    @IBAction func closeAction(_ sender: UIButton) {
        self.dismiss(animated: false)
    }
    
    @IBAction func confirmAction(_ sender: UIButton) {
        self.confirm.onNext(true)
        self.dismiss(animated: false)
    }
    
    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destination.
        // Pass the selected object to the new view controller.
    }
    */

}
